<!DOCTYPE html>
<html lang="zh-cn">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>后台登录页面</title>
    <!-- zui -->
    <link href="dist/css/zui.min.css" rel="stylesheet">
</head>

<body>
    <div class="panel" style="margin-bottom: 10px;">
        <div class="panel-heading">
            搜索条件
        </div>
        <div class="panel-body">
            <div class="col-md-3 with-padding col-md-offset-4">
                <button class="btn btn-block btn-info" type="button" id="addMune">新增</button>
            </div>
        </div>
    </div>
    <div class="panel">
        <div class="panel-heading">
            数据展示
        </div>
        <div class="panel-body">
            <table class="table table-striped table-hover table-bordered">
                <thead>
                    <tr>
                        <th>菜单ID</th>
                        <th>菜单名字</th>
                        <th>跳转路径</th>
                        <th hidden="hidden">父</th>
                        <th>菜单图标</th>
                        <th>创建时间</th>
                        <th>操作</th>
                    </tr>
                </thead>
                <tbody id="tableData">
                    <tr>
                        <td>1</td>
                        <td>测试1</td>
                        <td>2020-1-1</td>
                        <td>11</td>
                        <td>普通管理员</td>
                        <td>启用</td>
                        <td>
                            <button class="btn btn-mini " type="button">编辑</button>
                            <button class="btn btn-mini " type="button">删除</button>
                        </td>
                    </tr>
                </tbody>
            </table>
            <!-- 分页 -->
            <div class="text-center">
                <button class="btn" type="button" id="prePageBtn">上一页</button>
                <span id="pageNumber">1/3</span>
                <button class="btn" type="button" id="nextPageBtn">下一页</button>
            </div>
        </div>
    </div>

    <!-- 增增-->
    <div class="modal fade" id="add">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">关闭</span></button>
                    <h4 class="modal-title">新增</h4>
                </div>
                <div class="modal-body">
                    <div class="col-md-12 with-padding">
                        <div class="input-group">
                            <span class="input-group-addon">菜单ID</span>
                            <input type="text" class="form-control" id="addMenuId">
                        </div>
                    </div>
                    <div class="col-md-12 with-padding">
                        <div class="input-group">
                            <span class="input-group-addon">菜单名字</span>
                            <input type="text" class="form-control" id="addMenuName">
                        </div>
                    </div>
                    <div class="col-md-12 with-padding">
                        <div class="input-group">
                            <span class="input-group-addon">跳转路径</span>
                            <input type="text" class="form-control" id="addMenuUrl">
                        </div>
                    </div>
                    <div class="col-md-12 with-padding">
                        <div class="input-group">
                            <span class="input-group-addon">父级</span>
                            <select class="form-control" id="addPmenuId">
                                <option value="1">前台管理</option>
                                <option value="2">后台管理</option>
                            </select>
                        </div>
                    </div>
                    <div class="col-md-12 with-padding">
                        <div class="input-group">
                            <span class="input-group-addon">图标</span>
                            <input type="text" class="form-control" id="addPic">
                        </div>
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                    <button type="button" class="btn btn-primary" onclick="addAjax();">保存</button>
                </div>
            </div>
        </div>
    </div>

    <!-- 编辑-->
    <div class="modal fade" id="update">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">关闭</span></button>
                    <h4 class="modal-title">新增</h4>
                </div>
                <div class="modal-body">
                    <div class="col-md-12 with-padding">
                        <div class="input-group">
                            <span class="input-group-addon">菜单ID</span>
                            <input type="text" class="form-control" id="updateMenuId" disabled="disabled">
                        </div>
                    </div>
                    <div class="col-md-12 with-padding">
                        <div class="input-group">
                            <span class="input-group-addon">菜单名字</span>
                            <input type="text" class="form-control" id="updateMenuName">
                        </div>
                    </div>
                    <div class="col-md-12 with-padding">
                        <div class="input-group">
                            <span class="input-group-addon">跳转路径</span>
                            <input type="text" class="form-control" id="updateMenuUrl">
                        </div>
                    </div>
                    <div class="col-md-12 with-padding">
                        <div class="input-group">
                            <span class="input-group-addon">父级</span>
                            <select class="form-control" id="updatePmenuId">
                                <option value="1">前台管理</option>
                                <option value="2">后台管理</option>
                            </select>
                        </div>
                    </div>
                    <div class="col-md-12 with-padding">
                        <div class="input-group">
                            <span class="input-group-addon">图标</span>
                            <input type="text" class="form-control" id="updatePic">
                        </div>
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                    <button type="button" class="btn btn-primary" onclick="updateAjax();">保存</button>
                </div>
            </div>
        </div>
    </div>

</body>

<!-- jQuery (ZUI中的Javascript组件依赖于jQuery) -->
<script src="dist/lib/jquery/jquery-3.4.1.min.js"></script>
<!-- ZUI Javascript组件 -->
<script src="dist/js/zui.min.js"></script>
<!-- layer弹窗JS -->
<script src="layer/layer.js"></script>
<script>
    function hide(modal) {
        $(modal).modal('hide', 'fit');
    };

    function showPanel(modal) {
        $(modal).modal({
            backdrop: 'static', //点击页面不隐藏
            show: true, //显示窗口
            moveable: true, //能够移动
            rememberPos: true //记住移动的位置
        });
    }
</script>
<!-- 导入自定义JS -->
<script src="js/menu_mgr.js"></script>


</html>